package com.ruoyi.voit.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.voit.mapper.MaintenanceMapper;
import com.ruoyi.voit.domain.Maintenance;
import com.ruoyi.voit.service.IMaintenanceService;

/**
 * 充电桩维修记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-17
 */
@Service
public class MaintenanceServiceImpl implements IMaintenanceService 
{
    @Autowired
    private MaintenanceMapper maintenanceMapper;

    /**
     * 查询充电桩维修记录
     * 
     * @param recordId 充电桩维修记录主键
     * @return 充电桩维修记录
     */
    @Override
    public Maintenance selectMaintenanceByRecordId(String recordId)
    {
        return maintenanceMapper.selectMaintenanceByRecordId(recordId);
    }

    /**
     * 查询充电桩维修记录列表
     * 
     * @param maintenance 充电桩维修记录
     * @return 充电桩维修记录
     */
    @Override
    public List<Maintenance> selectMaintenanceList(Maintenance maintenance)
    {
        return maintenanceMapper.selectMaintenanceList(maintenance);
    }

    /**
     * 新增充电桩维修记录
     * 
     * @param maintenance 充电桩维修记录
     * @return 结果
     */
    @Override
    public int insertMaintenance(Maintenance maintenance)
    {
        return maintenanceMapper.insertMaintenance(maintenance);
    }

    /**
     * 修改充电桩维修记录
     * 
     * @param maintenance 充电桩维修记录
     * @return 结果
     */
    @Override
    public int updateMaintenance(Maintenance maintenance)
    {
        return maintenanceMapper.updateMaintenance(maintenance);
    }

    /**
     * 批量删除充电桩维修记录
     * 
     * @param recordIds 需要删除的充电桩维修记录主键
     * @return 结果
     */
    @Override
    public int deleteMaintenanceByRecordIds(String[] recordIds)
    {
        return maintenanceMapper.deleteMaintenanceByRecordIds(recordIds);
    }

    /**
     * 删除充电桩维修记录信息
     * 
     * @param recordId 充电桩维修记录主键
     * @return 结果
     */
    @Override
    public int deleteMaintenanceByRecordId(String recordId)
    {
        return maintenanceMapper.deleteMaintenanceByRecordId(recordId);
    }
}
